﻿CREATE TABLE [dbo].[Note]
(
	[NoteId] [uniqueidentifier] DEFAULT newid() NOT NULL,
	[Name] [nvarchar](max) NOT NULL,
    [Content] [nvarchar](max) NULL,
    [Priority] [int] NULL,
    [CreatedBy] [uniqueidentifier] NOT NULL, -- FK to Person
    [IsDeleted] [bit] DEFAULT 0 NOT NULL,
	[CreatedOn] [datetime] DEFAULT getdate() NOT NULL,
    [LastChanged] [datetime] DEFAULT getdate() NOT NULL

CONSTRAINT [PK_Note] PRIMARY KEY CLUSTERED 
(
	[NoteId] ASC
)WITH (IGNORE_DUP_KEY = OFF) ON [PRIMARY]
) ON [PRIMARY]
GO